package com.tyut.rxtnongyespringboot.controller;// AuthController.java
import com.tyut.rxtnongyespringboot.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

@Controller
public class AuthController {

    @GetMapping("/login")
    public String login() {
        return "login";
    }

    @GetMapping("/register")
    public String register() {
        return "register";
    }

    @PostMapping("/register")
    public String processRegister(User user) {
        // 处理用户注册逻辑
        return "redirect:/login";
    }
}

